//
//  MTUtil.h
//  mt_ios
//
//  Created by cherry pu on 17/1/17.
//  Copyright © 2017年 miTing. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface MBUtil : NSObject

#pragma mark - GCD async
+ (void)runInGlobalQueue:(void (^)(void))queue;
+ (void)runInMainQueue:(void (^)(void))queue;
+ (void)runAfterSecs:(float)secs block:(void (^)(void))block;

#pragma mark - 翻转数组
+ (NSArray*)reverseArray:(NSArray*)originArray;

#pragma mark - 生成与好友的conversationId
+ (NSString *)getConversationIdWithUserId:(NSString *)userId;

#pragma mark - 获取当前时间戳
+ (int64_t)getCurrentTimestamp;

#pragma mark - 获取用户年龄
+ (NSInteger)getUserAgeWithInputDateString:(NSString *)dateString andDateFormat:(NSString *)dateFormat;

#pragma mark - 缓存清理相关
+(float)folderSizeAtPath:(NSString *)path;

+(float)fileSizeAtPath:(NSString *)path;

+(void)clearCache:(NSString *)path;

#pragma mark - 加密相关
+ (NSString *)uuid;
+ (NSString *)md5:(NSString *)str;

#pragma mark - 检查是否是数字
+ (BOOL)checkStringIsNumWithStr:(NSString *)string;

#pragma mark - 根据绘画风格获取显示颜色
+ (UIColor *)getColorWithTypeString:(NSString *)string;

#pragma mark - 获取当前控制器
+ (UIViewController *)getCurrentVC;

@end
